<div class="cashMovements view">
    <h2><?php __('Cash Movement'); ?></h2>
    <dl>
        <?php
        $i = 0;
        $class = ' class="altrow"';
        ?>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Id'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo $cashMovement['CashMovement']['id']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Caja del día'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo date('d/m/Y H:i:s', strtotime($cashMovement['Cash']['date_open'])); ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('User'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo $this->Html->link($cashMovement['User']['name'], array('controller' => 'users', 'action' => 'view', $cashMovement['User']['id'])); ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Acción'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php
            if ($cashMovement['CashMovement']['type'] == 'in') {
                echo 'Entrada';
            } else {
                echo 'Salida';
            }
            ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Monto'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo '$' . $cashMovement['CashMovement']['amount']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Tipo'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php
            switch ($cashMovement['CashMovement']['movement']) {
                case 'simple':
                    $movimiento = 'Simple';
                    break;
                case 'sign':
                    $movimiento = 'Seña';
                    break;
                case 'employee':
                    $movimiento = 'Pago Empleado ' . $employees[$cashMovement['CashMovement']['employee_id']];
                    break;
                case 'provider':
                    $movimiento = 'Pago Proveedor ' . $providers[$cashMovement['CashMovement']['provider_id']];
                    break;
                case 'expense':
                    $movimiento = 'Pago Gasto';
                    break;
                case 'transfer_cash':
                    $movimiento = 'Transferencia Caja Grande ('. $this->Html->link('Ver Movimiento', array('controller' => 'big_cash_movements', 'action' => 'view', $cashMovement['CashMovement']['big_cash_movement_id'])).')';
                    break;
                case 'job_payment':
                    $movimiento = 'Pago Saldo Trabajo';
                    break;
                default:
                    $movimiento = '';
                    break;
            }
            echo $movimiento;
            ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Descripción'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo $cashMovement['CashMovement']['description']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class; ?>><?php __('Fecha'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class; ?>>
            <?php echo date('d/m/Y H:i:s', strtotime($cashMovement['CashMovement']['created'])); ?>
            &nbsp;
        </dd>
    </dl>
</div>